﻿using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Data.SqlClient;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace loginWinForm.dao
{
    class CommonSQLDao
    {
		public static DataSet GetDataSet(string strsql)
		{
			string strcon = ConfigurationManager.ConnectionStrings["connSqlServer"].ToString();
			SqlConnection con = new SqlConnection(strcon);
			DataSet ds = new DataSet();
			using(SqlDataAdapter DA = new SqlDataAdapter(strsql, con))
            {
				DA.Fill(ds);
			}	
			return ds;
		}
    }
}
